export const metadata = {
  title: 'Python Cookbook',
  description:
    'Example applications built with the Surfer Protocol Python SDK.',
}

import Image from '@/components/Image'
import streamlit_chatbot from '@/images/streamlit-chatbot.png'
import knowledge_graph from '@/images/knowledge-graph.png'
import claude_mcp from '@/images/claude-mcp.png'

## Prerequisites

1. **Desktop Application**: The Surfer desktop application must be running in the background for the SDK to work.
   - Follow the installation instructions on the [Desktop Application Installation](/desktop/installation) page
   - Connect your platforms and export your data to use with the SDK.

> Note: The desktop app runs a local server on port 2024 that the SDK communicates with. Make sure the server is running before using the SDK.

### Claude Model Context Protocol

Check out the <a target="_blank" href="/claude">Claude Model Context Protocol</a> page for more details.

### Streamlit Chatbot

Full code: <a target="_blank" href="https://github.com/Surfer-Org/Protocol/blob/main/cookbook/python/streamlit-chatbot/app.py">Streamlit Chatbot</a>

Create a Streamlit chatbot that uses Weaviate and OpenAI to analyze your Surfer data:

<Image src={streamlit_chatbot} alt="Streamlit Chatbot" />

### Knowledge Graph

Turn your Surfer data into a knowledge graph.

Full code: <a target="_blank" href="https://github.com/Surfer-Org/Protocol/blob/main/cookbook/python/knowledge-graph/app.py">Knowledge Graph</a>

<Image src={knowledge_graph} alt="Knowledge Graph" />
